﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Gl_mes.DAL.MesDB
{
    [Table("loss_reason")]
    [Serializable]
    public class LossReason
    {
        /// <summary>
        /// ID，主键，自增长
        /// </summary>
        [Column("id")]
        [Key]
        [Required]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }

        /// <summary>
        /// 缺失原因代号
        /// </summary>
        [Column("reason_code")]
        [Required]
        [MaxLength(20)]
        public string ReasonCode { get; set; }

        /// <summary>
        /// 缺失原因名称
        /// </summary>
        [Column("reason_Name")]
        [Required]
        [MaxLength(30)]
        public string ReasonName { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Column("remark")]
        [Required]
        [MaxLength(150)]
        public string Remark { get; set; }

        /// <summary>
        /// 建档人
        /// </summary>
        [Column("create_user")]
        [MaxLength(20)]
        public string CreateUser { get; set; }

        /// <summary>
        /// 缺失原因代号
        /// </summary>
        [Column("create_date")]
        public DateTime? CreateDate { get; set; }
    }
}
